IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].tb_department') AND TYPE in (N'U'))
BEGIN
CREATE TABLE tb_department
(
    Id INT IDENTITY(1,1) NOT NULL,
	DepartmentCode varchar(3) not null,
	DepartmentName varchar(30) not null,
	DepartmentDescription varchar(255) not null default(''),
	ParentDepartment varchar(3) not null default(''),
    CreateBy VARCHAR(100),
    CreateDate DATETIME DEFAULT(GETDATE()),
    UpdateBy VARCHAR(100),
    UpdateDate DATETIME,
	CONSTRAINT PK_department_Id PRIMARY KEY CLUSTERED (Id)
) 
END
GO